package com.tencreat.domain.mall;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;


/**
 * 消息列对象 mall_message_list
 *
 * @author tencreat
 * @date 2021-11-24
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("mall_message_list")
public class MallMessageList extends BaseEntity<MallMessageList>{
    private static final long serialVersionUID = 1L;


    /** 编号 */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;


    /** 用户id;app端存uuid,平台端存id */
    @Excel(name = "用户id;app端存uuid,平台端存id")
    @ApiModelProperty(value= "用户id;app端存uuid,平台端存id")
    @TableField("`user_id`")
    private Long userId;


    /** 置顶时间;为null不置顶 */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "置顶时间;为null不置顶", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`stick_time`")
    private LocalDateTime stickTime;


    /** 关联用户id;app端存uuid,平台端存id */
    @Excel(name = "关联用户id;app端存uuid,平台端存id")
    @ApiModelProperty(value= "关联用户id;app端存uuid,平台端存id")
    @TableField("`join_user_id`")
    private Long joinUserId;


    /** 未读消息数 */
    @Excel(name = "未读消息数")
    @ApiModelProperty(value= "未读消息数")
    @TableField("`unread_message`")
    private Long unreadMessage;

    /** 最新消息内容 */
    @ApiModelProperty("最新消息内容")
    private String newMsg;

    /** 最新消息内容类型 */
    @ApiModelProperty("最新消息内容类型")
    private Integer newMsgType;

    /** 删除标志;0代表存在 2代表删除 */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;


    /** 乐观锁 */
    @Excel(name = "乐观锁")
    @ApiModelProperty(value= "乐观锁")
    @TableField("`revision`")
    private Long revision;


  /*  *//** 租户号 *//*
    @Excel(name = "租户号")
    @ApiModelProperty(value= "租户号")
    @TableField("`tenant_id`")
    private Long tenantId;*/


}
